1. Field of the Invention
The present invention relates to a variable bit rate encoder of MPEG2 used as an encoder for such as authoring of DVD.
2. Description of the Prior Art
In a case where a picture information is processed in digital signals, a large amount of information must be handled. In order to make a recording, a reproduction and a transmission of a picture signal possible with a smaller amount of information, various high efficiency coding systems have been proposed and recording/reproducing devices using these systems have been realized.
In a conventional recording/reproducing device, an amount of data per unit time is generally constant and, therefore, the conventional recording/reproducing device is advantageous in that there is no need of using any special constructions in a recording system, a recording medium and a reproducing system. However, since the recording/reproducing is performed at a constant bit rate, it is impossible to record/reproduce an information of a long time original signal by effectively using a recording capacity of the recording medium.
In order to solve this problem, a high efficiency, variable bit rate coding system has been proposed, which makes an effective use of a recording capacity of a recording medium possible by assigning a small code amount to a portion of the information content of the original signal, which has no influence on restoration of the signal, as code amount per predetermined time and assigning a large code amount to a portion of the information content of the original signal, which has a large influence on restoration of the signal, as code amount per predetermined time.
An example of the conventional encoder according to the high efficiency, variable bit rate coding system will be described. First, a picture signal to be high efficiency-coded is temporarily coded (first coding) to obtain a data of a generation amount of code. Then, a coding condition is set by using the data obtained by the temporary coding such that a true coding (second coding) is performed to obtain an aimed total code amount.
By performing two coding's for one and the same picture signal in this manner, it is possible to generate high efficiency coded data of variable bit rate under the condition of, for example, a predetermined generation code amount.
As another example, an encoder has been proposed, in which an image quality is improved by partially changing an apportioning amount of code according to a result of decoding of the code generated by the second coding in the high efficiency, variable bit rate encoder capable of generating the high efficiency coded data at variable bit rate by the two coding's.
However, since, in the high efficiency encoders mentioned above, quantization is performed differently for the first coding and the second coding, the second coding is performed with motion vector and coding mode which are different from those in the first coding.
In this case, since conditions other than quantization are different between the first coding and the second coding, a prediction error itself changes considerably. Therefore, the code given to the second coding based on the first coding is not used effectively.
Depending upon the result of decoding of the code generated by the second coding, there may be a case where an improvement of image quality is performed by partially changing the apportionment of the amount of code. In such case, however, it is impossible to exactly confirm the change of image quality due to the re-apportionment of the amount of code.
This fact will be described in detail with reference to FIG. 1. In FIG. 1, the re-coding is performed by assigning a larger amount of code to a re-apportioning section of a plurality of GOP's (group-of-picture) including an assigned re-apportioning section, as shown. A construction of GOP, for example GOP1, in MPEG composed of I, P and B pictures is shown in a lower portion of FIG. 1. Incidentally, I picture is a intra coded picture (intra-frame coded picture), P picture is a predictive coded picture (inter-frame forward prediction coded picture) and B picture is a bidirectional predictive coded picture (bi-directional prediction coded picture).
In the above mentioned re-coding, when only GOP1 which is a head of the re-apportioning section is not a closed GOP, there is no reference frame necessary to code B1 and B2 frames of the B picture precedent on a time axis to an 13 frame of the I picture in the GOP1. Therefore, it is impossible to exactly code the B1 and B2 frames of the GOP1. (In FIG. 1, the reference frame necessary to code the B1 and B2 frames of the GOP1 corresponds to a P0 frame of the GOP which is precedent on the time axis to the head GOP1 of the re-apportioning section.) Further, since a large amount of code is necessary to code the B1 and B2 frames, an amount of additional code to be assigned to a later half of the section is reduced. Therefore, it is impossible to exactly confirm the effectiveness of the re-apportionment.